class ConsistentHashing {
  constructor(servers = [], type) {
    this.servers = servers
    this.type = type
  }

  getNodes(str, key, type) {
    const hash = getHash(str, key)
             
  }

  setNodes(str, key, type) {
    try {
      switch (this.type || type) {
        case 'PHYSICAL':
          return ''
        case 'VIRTUAL':
          return ''
        default:
          return null
      }
    } catch (err) {
      return console.log('ERR:', err)
    } 
  }

  physical(str, key) {
    return this.setNodes(str, key, 'PHYSICAL')
  }

  virtual(str, key) {
    return this.setNodes(str, key, 'VIRTUAL')
  }
  
}

mudule.exports = ConsistentHashing
